home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Workbench Add-On
/
Workbench Add-On - Volume 1.iso
/
Dev
/
Amiga-E
/
E_v3.2a
/
Src
/
Tools
/
Exceptions
/
exceptions.e
next >
Wrap
Text File
|
1992-09-02
|
699b
|
27 lines
-> general exception catcher for test purposes
OPT MODULE
EXPORT PROC report_exception()
DEF e[5]:ARRAY
IF exception
WriteF('Program caused exception: ')
IF exception<10000
WriteF('\d\n',exception)
ELSE
SELECT exception
CASE "MEM"; WriteF('no memory\n')
CASE "OPEN"; WriteF('could not open file \s\n',IF exceptioninfo THEN exceptioninfo ELSE '')
CASE "^C"; WriteF('***BREAK\n')
-> and others...
DEFAULT
e[4]:=0
^e:=exception
WHILE e[]=0 DO e++
WriteF('"\s" ',e)
WriteF(IF exceptioninfo<1000 THEN '[\d]\n' ELSE '[\h]\n',exceptioninfo)
ENDSELECT
ENDIF
ENDIF
ENDPROC